#!/usr/bin/perl -w

#=======================================================================
# encap
# File ID: d4e109b0-5d38-11df-ab05-90e6ba3022ac
# Encapsulate stdin in XML tags.
#=======================================================================

use strict;

defined($ARGV[0]) || ($ARGV[0] = "l");
for my $Elem (@ARGV) {
    print("<$Elem>");
}
print(join("", <STDIN>));
for my $Elem (reverse @ARGV) {
    print("</$Elem>");
}
